package com.maila.xiaoaoschool.entity;

import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by mark on 2017/12/11.
 */

public class ShopClasses {

    /**
     * result : 1
     * message : 展示成功
     * data : [{"typeid":"318","shopid":"211","typename":"肉","orderid":"0","good":[{"goodsid":"2014","goodsname":"酱油炒饭","img":"/upload/pliang/20160610155317604.jpg","sellcount":"14","instro":"","is_com":"0","is_hot":"0","is_new":"0","is_live":"1","is_cx":"0","cost":"30.00","bagcost":"7.70","goodattr":"份","cxzhe":0,"cxcost":0,"cxstarttime":0,"ecxendttime":0,"cxnum":0},{"goodsid":"2017","goodsname":"朝鲜冷面","img":"/upload/pliang/20150711090300503.jpg","sellcount":"0","instro":"简介内容2","is_com":"0","is_hot":"0","is_new":"0","is_live":"1","is_cx":"1","cost":"20.00","bagcost":"0.00","goodattr":"份","cxzhe":8.5,"cxcost":17,"cxstarttime":"2017-12-01","ecxendttime":"2017-12-31","cxnum":"1"}]},{"typeid":"320","shopid":"211","typename":"米","orderid":"2","good":[{"goodsid":"2016","goodsname":"矿泉水","img":"","sellcount":"0","instro":"","is_com":"0","is_hot":"0","is_new":"0","is_live":"1","is_cx":"0","cost":"1.00","bagcost":"0.00","goodattr":"份","cxzhe":0,"cxcost":0,"cxstarttime":0,"ecxendttime":0,"cxnum":0}]}]
     */

    private int result;
    private String message;
    private List<DataBean> data;


    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * typeid : 318
         * shopid : 211
         * typename : 肉
         * orderid : 0
         * good : [{"goodsid":"2014","goodsname":"酱油炒饭","img":"/upload/pliang/20160610155317604.jpg","sellcount":"14","instro":"","is_com":"0","is_hot":"0","is_new":"0","is_live":"1","is_cx":"0","cost":"30.00","bagcost":"7.70","goodattr":"份","cxzhe":0,"cxcost":0,"cxstarttime":0,"ecxendttime":0,"cxnum":0},{"goodsid":"2017","goodsname":"朝鲜冷面","img":"/upload/pliang/20150711090300503.jpg","sellcount":"0","instro":"简介内容2","is_com":"0","is_hot":"0","is_new":"0","is_live":"1","is_cx":"1","cost":"20.00","bagcost":"0.00","goodattr":"份","cxzhe":8.5,"cxcost":17,"cxstarttime":"2017-12-01","ecxendttime":"2017-12-31","cxnum":"1"}]
         */

        private int typeid;
        private String shopid;
        private String typename;
        private String orderid;
        private List<GoodBean> good;
       public   void settype(){
            for(int i=0;i<good.size();i++){
                good.get(i).setType(typeid);
                good.get(i).setTypename(typename);
            }
        }
        public int getTypeid() {
            return typeid;
        }

        public void setTypeid(int typeid) {
            this.typeid = typeid;
        }

        public String getShopid() {
            return shopid;
        }

        public void setShopid(String shopid) {
            this.shopid = shopid;
        }

        public String getTypename() {
            return typename;
        }

        public void setTypename(String typename) {
            this.typename = typename;
        }

        public String getOrderid() {
            return orderid;
        }

        public void setOrderid(String orderid) {
            this.orderid = orderid;
        }

        public List<GoodBean> getGood() {
            return good;
        }

        public void setGood(List<GoodBean> good) {
            this.good = good;
        }


        public static class GoodBean  implements Serializable {
            /**
             * goodsid : 2014
             * goodsname : 酱油炒饭
             * img : /upload/pliang/20160610155317604.jpg
             * sellcount : 14
             * instro :
             * is_com : 0
             * is_hot : 0
             * is_new : 0
             * is_live : 1
             * is_cx : 0
             * cost : 30.00
             * bagcost : 7.70
             * goodattr : 份
             * cxzhe : 0
             * cxcost : 0
             * cxstarttime : 0
             * ecxendttime : 0
             * cxnum : 0
             */

            private int goodsid;

            private String goodsname;

            private String img;

            private String sellcount;

            private String instro;

            private int is_com;

            private int is_hot;

            private int is_new;

            private int is_live;

            private int is_cx;

            private double cost;

            private double bagcost;

            private String goodattr;

            private float cxzhe;

            private double cxcost;

            private String cxstarttime;

            private String ecxendttime;

            private String cxnum;

            private int buynum=0;//临时购买的数量
            private int type;
            private  String  typename;

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }

            public String getTypename() {
                return typename;
            }

            public void setTypename(String typename) {
                this.typename = typename;
            }

            public int getBuynum() {
                return buynum;
            }

            public void setBuynum(int buynum) {
                this.buynum = buynum;
            }

            public int getGoodsid() {
                return goodsid;
            }

            public void setGoodsid(int goodsid) {
                this.goodsid = goodsid;
            }

            public String getGoodsname() {
                return goodsname;
            }

            public void setGoodsname(String goodsname) {
                this.goodsname = goodsname;
            }

            public String getImg() {
                return img;
            }

            public void setImg(String img) {
                this.img = img;
            }

            public String getSellcount() {
                return sellcount;
            }

            public void setSellcount(String sellcount) {
                this.sellcount = sellcount;
            }

            public String getInstro() {
                return instro;
            }

            public void setInstro(String instro) {
                this.instro = instro;
            }

            public int getIs_com() {
                return is_com;
            }

            public void setIs_com(int is_com) {
                this.is_com = is_com;
            }

            public int getIs_hot() {
                return is_hot;
            }

            public void setIs_hot(int is_hot) {
                this.is_hot = is_hot;
            }

            public int getIs_new() {
                return is_new;
            }

            public void setIs_new(int is_new) {
                this.is_new = is_new;
            }

            public int getIs_live() {
                return is_live;
            }

            public void setIs_live(int is_live) {
                this.is_live = is_live;
            }

            public int getIs_cx() {
                return is_cx;
            }

            public void setIs_cx(int is_cx) {
                this.is_cx = is_cx;
            }

            public double getCost() {
                return cost;
            }

            public void setCost(double cost) {
                this.cost = cost;
            }

            public double getBagcost() {
                return bagcost;
            }

            public void setBagcost(double bagcost) {
                this.bagcost = bagcost;
            }

            public String getGoodattr() {
                return goodattr;
            }

            public void setGoodattr(String goodattr) {
                this.goodattr = goodattr;
            }

            public float getCxzhe() {
                return cxzhe;
            }

            public void setCxzhe(float cxzhe) {
                this.cxzhe = cxzhe;
            }

            public double getCxcost() {
                return cxcost;
            }

            public void setCxcost(double cxcost) {
                this.cxcost = cxcost;
            }

            public String getCxstarttime() {
                return cxstarttime;
            }

            public void setCxstarttime(String cxstarttime) {
                this.cxstarttime = cxstarttime;
            }

            public String getEcxendttime() {
                return ecxendttime;
            }

            public void setEcxendttime(String ecxendttime) {
                this.ecxendttime = ecxendttime;
            }

            public String getCxnum() {
                return cxnum;
            }

            public void setCxnum(String cxnum) {
                this.cxnum = cxnum;
            }
        }
    }
}
